package com.mego.weblink.activitys;

import android.app.Service;
import android.content.Intent;
import android.os.Build;
import android.os.IBinder;
import android.util.Log;

/**
 * This Service is Persistent Service. Do some what you want to do here.<br/>
 *
 * Created by Mars on 12/24/15.
 */
public class Service1 extends Service{

    @Override
    public void onCreate() {
        super.onCreate();
        //TODO do some thing what you want..
        Log.i("MainService", "Service1-onCreate");
        Intent start = new Intent(this, MyService.class);
        if (Build.VERSION.SDK_INT >= 26) {
            startForegroundService(start);
        } else {
            startService(start);
        }
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
}
